<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        /* div默认是块显示 独占一行，宽高属性生效，默认宽度是父级的100% */
        div{
            width: 400px;
            height: 400px;
        }
        .div1{
            background-color:pink;
        }
        .div2{
            background-color: red;
        }
        /* span默认是行显示，宽高设置无用，靠内容扩展 */
        span{
            width: 400px;
            height: 400px;
            background-color: blue;
            /* display可以改变显示模式 block块，inline-block行内块,inline行内*/
            display:block
        }
        /* img默认是行内块模式，一行共存多个，尺寸由内容撑开，宽高生效 */
        img{
            
        }
    </style>
</head>
<body>
    <div class="div1">div1</div>
    <div class="div2">div2</div>
    <span>11111</span>
    <span>11111</span>
    <img src="./cat.png" alt="">
    <img src="./cat.png" alt="">
</body>
</html>